export const appToken = 'appToken'
export const baseStoreState = 'baseStoreState'
export const fileUrlRoot = `${process.env.VUE_APP_PC_AFTER}sys/common/static/`
export const getStatus = function(dict,status){
  if(dict[status]){
    return dict[status];
  }
  return {
    text: '未知',
    bgcolor: 'var(--van-gray-5)',
    color: 'var(--van-gray-8)'
  }
}
export const dataType = {
  normal: 'normal',
  slot: 'slot',
  hidden: 'hidden',
  button: 'button',
  image: 'image',
  input: 'input',
  select: 'select',
  radio: 'radio',
  checkbox: 'checkbox',
  multiple: 'multiple',
  right: 'right',
  left: 'left',
  top: 'top',
  bottom: 'bottom',
  list: 'list',
  number: 'number',
  disabled: 'disabled',
  visiable: 'visiable',
  readonly: 'readonly',
  textarea: 'textarea',
  dialog: 'dialog'
}
export const colorList = [
  "#fff600",
  "#ff4848",
  "#7bff91",
  "#92c5ff",
  "#ff8441",
  "#afff48",
  "#ff2285",
  "#ffba34",
  "#1cc98e",
  "#f9608f",
  "#eeffb9",
  "#c160ff",
  "#00fcff",
  "#00ff3c",
  "#ff4e00",
  "#8656ff",
  "#ffd072",
  "#52acff",
  "#ff0000",
  "#4099ff",
]
export const equipmentStatus = {
  '0': {
    text: '购置',
    bgcolor: 'var(--van-gray-1)',
    color: 'var(--van-gray-8)'
  },
  '10': {
    text: '验收',
    bgcolor: 'var(--van-gray-3)',
    color: 'var(--van-gray-8)'
  },
  '20': {
    text: '安装',
    bgcolor: 'var(--van-blue)',
    color: 'var(--van-white)'
  },
  '30': {
    text: '使用中',
    bgcolor: 'var(--van-green)',
    color: 'var(--van-white)'
  },
  '40': {
    text: '维保中',
    bgcolor: 'var(--van-orange)',
    color: 'var(--van-white)'
  },
  '50': {
    text: '停机',
    bgcolor: 'var(--van-orange-dark)',
    color: 'var(--van-white)'
  },
  '70': {
    text: '报废',
    bgcolor: 'var(--van-red)',
    color: 'var(--van-white)'
  }
}
export const getEquipmentStatus = function(state){
  return getStatus(equipmentStatus,state)
}